<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    

<head><meta name="generator" content="Hexo 3.8.0">
    <meta charset="utf-8">
    <meta name="keywords" content="小知识点「技术」, 炫杉">
    <meta name="description" content="
Shell相关
touch xxx.x 新建文件

ls -a查看隐藏文件包括“.”和“..” -A不包括“.”和“..”目录
-C 按列列出文件

清屏: edit菜单里找。Terminal:⌃+⌘+L iTerm:⌘+K

删除文件：">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <title>小知识点「技术」 | 炫杉</title>
    <link rel="icon" type="image/png" href="/favicon.png">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/css/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery-2.2.0.min.js"></script>
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css">
<link rel="stylesheet" href="/css/prism-line-numbers.css" type="text/css"></head>

</head>

<body>

<header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="container">
            <div class="nav-wrapper">
                <div class="brand-logo">
                    <a href="/" class="waves-effect waves-light">
                        
                        <img src="/medias/logo.png" class="logo-img hide-on-small-only">
                        
                        <span class="logo-span">炫杉</span>
                    </a>
                </div>
                <a href="#" data-activates="mobile-nav" class="button-collapse"><i class="fa fa-navicon"></i></a>
<ul class="right">
    
    <li class="hide-on-med-and-down">
        <a href="/" class="waves-effect waves-light">
            
            <i class="fa fa-home"></i>
            
            <span>Index</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/tags" class="waves-effect waves-light">
            
            <i class="fa fa-tags"></i>
            
            <span>Tags</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/categories" class="waves-effect waves-light">
            
            <i class="fa fa-bookmark"></i>
            
            <span>Categories</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/archives" class="waves-effect waves-light">
            
            <i class="fa fa-archive"></i>
            
            <span>Archives</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/about" class="waves-effect waves-light">
            
            <i class="fa fa-user-circle-o"></i>
            
            <span>About</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="https://oo1.win" class="waves-effect waves-light">
            
            <i class="fa fa-star"></i>
            
            <span>Bookmark</span>
        </a>
    </li>
    
    <li>
        <a id="toggleSearch" class="waves-effect waves-light">
            <i id="searchIcon" class="mdi-action-search"></i>
        </a>
    </li>

</ul>

<div class="side-nav" id="mobile-nav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">炫杉</div>
        <div class="logo-desc">
            
            提着鸟笼的老头站在一旁拍我肩膀 我猜他想的应该和我一样
            
        </div>
    </div>

    <ul class="menu-list mobile-menu-list">
        
        <li>
            <a href="/" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-home"></i>
                
                Index
            </a>
        </li>
        
        <li>
            <a href="/tags" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-tags"></i>
                
                Tags
            </a>
        </li>
        
        <li>
            <a href="/categories" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-bookmark"></i>
                
                Categories
            </a>
        </li>
        
        <li>
            <a href="/archives" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-archive"></i>
                
                Archives
            </a>
        </li>
        
        <li>
            <a href="/about" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-user-circle-o"></i>
                
                About
            </a>
        </li>
        
        <li>
            <a href="https://oo1.win" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-star"></i>
                
                Bookmark
            </a>
        </li>
        
        
    </ul>

    <div class="social-link"><a href="https://github.com/ixsim" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
    <i class="fa fa-github"></i>
</a>

<a href="mailto:chenjiayin1990@163.com" class="tooltipped" target="_blank" data-tooltip="邮件:chinalixs@qq.com" data-position="top" data-delay="50">
    <i class="fa fa-envelope-open"></i>
</a>

<a href="http://wpa.qq.com/msgrd?v=3&uin=6956820&site=qq&menu=yes" class="tooltipped" data-tooltip="QQ: 6956820" data-position="top" data-delay="50">
    <i class="fa fa-qq"></i>
</a>
</div>
</div>

            </div>
        </div>

        
    </nav>
</header>



<div class="bg-cover post-cover" style="background-image: url('/medias/featureimages/19.jpg')">
    <div class="container">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <div class="description center-align post-title">
                        小知识点「技术」
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1,
    #articleContent h2,
    #articleContent h3,
    #articleContent h4,
    #articleContent h5,
    #articleContent h6 {
        padding-top: 76px;
        margin-top: -76px;
    }

    #articleContent h1 {
        line-height: 3.5rem;
    }

    #articleContent h2 {
        line-height: 3.2rem;
    }

    #articleContent h3 {
        line-height: 2.8rem;
    }

    #articleContent h4 {
        line-height: 2.5rem;
    }

    #articleContent h5 {
        line-height: 2.2rem;
    }

    #articleContent h6 {
        line-height: 1.9rem;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        margin: 35px 0 15px 0;
        padding-left: 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #toc-content .is-active-link::before {
        background-color: #42b983;
    }
</style>
<div class="row">
    <div class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            
            <div class="article-tag">
                
                <a href="/tags/tips/" target="_blank">
                    <span class="chip bg-color">tips</span>
                </a>
                
                <a href="/tags/Heroku/" target="_blank">
                    <span class="chip bg-color">Heroku</span>
                </a>
                
                <a href="/tags/Shell/" target="_blank">
                    <span class="chip bg-color">Shell</span>
                </a>
                
                <a href="/tags/iTerm2/" target="_blank">
                    <span class="chip bg-color">iTerm2</span>
                </a>
                
                <a href="/tags/Markdown/" target="_blank">
                    <span class="chip bg-color">Markdown</span>
                </a>
                
                <a href="/tags/Mac/" target="_blank">
                    <span class="chip bg-color">Mac</span>
                </a>
                
            </div>
            
            <div class="post-info">
                
                <span class="post-cate">
                    <i class="fa fa-bookmark fa-fw icon-category"></i>
                    
                    <a href="/categories/Others/" class="post-category" target="_blank">
                        Others
                    </a>
                    
                </span>
                

                <span class="post-date">
                    <i class="fa fa-clock-o fa-fw"></i>2018-07-25
                </span>
            </div>
        </div>
        <hr>
        <div class="card-content article-card-content">
            <div id="articleContent">
                <a id="more"></a>
<h1 id="Shell相关"><a href="#Shell相关" class="headerlink" title="Shell相关"></a>Shell相关</h1><ul>
<li><p><code>touch xxx.x</code> 新建文件</p>
</li>
<li><p><code>ls -a</code>查看隐藏文件包括“.”和“..” <code>-A</code>不包括“.”和“..”目录</p>
<p><code>-C</code> 按列列出文件</p>
</li>
<li><p>清屏: edit菜单里找。Terminal:<code>⌃+⌘+L</code> iTerm:<code>⌘+K</code></p>
</li>
<li><p>删除文件：<code>rm -f</code> -f后不会给任何提示。 -i是交互式删除</p>
<p>删除文件夹 -r</p>
</li>
<li><p>查找</p>
</li>
</ul>
<h2 id="自动运行命令脚本"><a href="#自动运行命令脚本" class="headerlink" title="自动运行命令脚本"></a>自动运行命令脚本</h2><p>shell命令写在记事本存成 1.sh</p>
<p>shell里运行<code>sh 1.sh</code>即可</p>
<p>关于需要输入密码时的交互：</p>
<pre class="line-numbers language-shell"><code class="language-shell">ssh tester@192.168.139.218 << EOF #用 <<eof 分割。这里就是输密码的地方="" cd="" kurento="" kurento-tutorial-java="" kurento-group-call="" mvn="" exec:java="" <span="" aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></eof></code></pre>
<h2 id="终端走代理"><a href="#终端走代理" class="headerlink" title="终端走代理"></a>终端走代理</h2><p>参考：<a href="https://blog.fazero.me/2015/09/15/%E8%AE%A9%E7%BB%88%E7%AB%AF%E8%B5%B0%E4%BB%A3%E7%90%86%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E6%B3%95/" target="_blank" rel="noopener">让终端走代理的几种方法</a></p>
<h2 id="Finder和终端快速转"><a href="#Finder和终端快速转" class="headerlink" title="Finder和终端快速转"></a>Finder和终端快速转</h2><ul>
<li>Finder到终端：拖窗口到终端界面</li>
<li>终端到Finder：<code>open .</code></li>
</ul>
<h1 id="iTerm2"><a href="#iTerm2" class="headerlink" title="iTerm2"></a>iTerm2</h1><h2 id="添加alias"><a href="#添加alias" class="headerlink" title="添加alias"></a>添加alias</h2><p>在 <code>.zshrc</code>这个文件里配置</p>
<p>注意例子：<code>alias blog=&quot;cd Documents/Hexo&quot;</code></p>
<p>其中<code>blog=&quot;xxx&quot;</code>等号两边不允许有空格！不然alias会失效。</p>
<h2 id="美化"><a href="#美化" class="headerlink" title="美化"></a>美化</h2><p>参考文章：<a href="https://www.cnblogs.com/kenz520/p/8259432.html" target="_blank" rel="noopener">https://www.cnblogs.com/kenz520/p/8259432.html</a></p>
<ul>
<li><p>iTerm2 -&gt; Make iTerm2 Default Term</p>
</li>
<li><p>配色：<a href="http://ethanschoonover.com/solarized" target="_blank" rel="noopener">http://ethanschoonover.com/solarized</a></p>
</li>
<li><p>oh_my_zsh：<a href="https://github.com/robbyrussell/oh-my-zsh" target="_blank" rel="noopener">https://github.com/robbyrussell/oh-my-zsh</a></p>
<p>装好后配置主题：</p>
<ul>
<li>修改<code>~/.zshrc</code>文件的ZSH_THEME=“”属性为”agnoster”</li>
</ul>
</li>
<li><p>字体：</p>
<p>克隆这个仓库到本地：<a href="https://github.com/powerline/fonts.git" target="_blank" rel="noopener">https://github.com/powerline/fonts.git</a></p>
<p>运行里面的 <code>install.sh</code> 就装好了</p>
</li>
</ul>
<h2 id="拓展"><a href="#拓展" class="headerlink" title="拓展"></a>拓展</h2><ul>
<li><p>命令提示与补全</p>
<ol>
<li>克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下<br><code>git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions</code></li>
<li>用 vim 编辑 .zshrc 文件，找到插件设置命令，默认是 <code>plugins=(git)</code> ，我们把它修改为<code>plugins=(zsh-autosuggestions git)</code></li>
</ol>
<p>PS：当你重新打开终端时可能看不到变化，可能你的字体颜色太淡了，我们把其改亮一些：</p>
<ol>
<li><code>cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions</code></li>
<li>用 vim 编辑 zsh-autosuggestions.zsh 文件，修改<code>ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=&#39;fg=10&#39;</code></li>
</ol>
</li>
<li><p>语法高亮效果</p>
<ol>
<li>使用homebrew包管理工具安装 zsh-syntax-highlighting 插件<br><code>brew install zsh-syntax-highlighting</code><br>如果电脑上还没有安装homebrew，请先安装homebrew<br><code>/usr/bin/ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quot;</code></li>
<li>配置.zshrc文件，插入一行<br><code>source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh</code></li>
<li>加载.zshrc配置<br><code>source ~/.zshrc</code></li>
<li>重新打开iTerm2窗口（或新打开一个iTerm2窗口）即可以看到效果</li>
</ol>
</li>
</ul>
<h2 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h2><ol>
<li>iTerm2 默认使用bash改用zsh解决方法：<code>chsh -s /bin/zsh</code></li>
<li>iTerm2 zsh切换回原来的dash：<code>chsh -s /bin/bash</code></li>
<li>卸载<code>oh my zsh</code>，在命令行输入：<code>uninstall_oh_my_zsh</code></li>
<li>路径前缀的XX@XX太长，缩短问题：<br>编辑<code>~/.oh-my-zsh/themes/agnoster.zsh-theme</code>主体文件，将里面的<code>build_prompt</code>下的<code>prompt_context</code>字段在前面加<code>#</code>注释掉即可</li>
</ol>
<h1 id="Markdown相关"><a href="#Markdown相关" class="headerlink" title="Markdown相关"></a>Markdown相关</h1><h2 id="Markdown-写上标下标"><a href="#Markdown-写上标下标" class="headerlink" title="Markdown 写上标下标"></a>Markdown 写上标下标</h2><ol>
<li><p>HTML</p>
<pre><code> &lt;!--利用HTML--&gt;
 &lt;sub&gt;上标&lt;/sub&gt;
 &lt;sup&gt;下标&lt;/sup&gt;
</code></pre><p> 例如<br> <code>X&lt;sub&gt;1&lt;/sub&gt;</code> ==&gt; X<sub>1</sub><br> <code>Y&lt;sup&gt;2345&lt;/sup&gt;</code> ==&gt;Y<sup>2345</sup></p>
</li>
<li><p>MathJax<br>MathJax不仅可以打上下标，还可以打双标。</p>
<blockquote>
<p>（1）两个符号$$中间是公式的内容<br>（2）^ 符号后接的字符为上标<br>（3）_ 符号后接的字符为下标<br>（4）如果同时有两个下标，则需要使用{}来将符号括起来 </p>
</blockquote>
</li>
</ol>
<p>如：<code>$x^p_{ij}$</code> ==&gt; $x^p_{ij}$</p>
<h1 id="Mac相关"><a href="#Mac相关" class="headerlink" title="Mac相关"></a>Mac相关</h1><h2 id="环境变量问题"><a href="#环境变量问题" class="headerlink" title="环境变量问题"></a>环境变量问题</h2><ol>
<li>在<code>.bash</code>的文件中加路径<ul>
<li>zsh则是添加到 <code>.zshrc</code>中 </li>
</ul>
</li>
<li>手动放快捷方式到<code>usr/bin</code>或<code>usr/local/bin</code>目录下</li>
</ol>
<blockquote>
<p>延伸：Mac系统的bash环境变量，加载顺序为：<br>/etc/profile<br>/etc/paths<br>~/.bash_profile<br>~/.bash_login<br>~/.profile<br>~/.bashrc</p>
</blockquote>
<p>设置PATH的语法都为：</p>
<pre class="line-numbers language-shell"><code class="language-shell">#中间用冒号隔开
export PATH=$PATH:<path 1="">:<path 2="">:<path 3="">:------:<path n="">
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></path></path></path></path></code></pre>
<h2 id="显示-隐藏文件"><a href="#显示-隐藏文件" class="headerlink" title="显示/隐藏文件"></a>显示/隐藏文件</h2><p>在Finder：<code>Command+Shift+.</code></p>
<h2 id="app已损坏-打不开"><a href="#app已损坏-打不开" class="headerlink" title=".app已损坏 打不开"></a>.app已损坏 打不开</h2><p><code>sudo spctl --master-disable</code></p>
<h2 id="打开macOS原生的NTFS"><a href="#打开macOS原生的NTFS" class="headerlink" title="打开macOS原生的NTFS"></a>打开macOS原生的NTFS</h2><ul>
<li><p><code>diskutil list</code> 找到你要写入的磁盘名</p>
</li>
<li><p><strong>开启读写NTFS：</strong></p>
<p><code>sudo vim /etc/fstab</code></p>
<p>在这个fstab文件里加入一句：</p>
<p><strong><code>LABEL=你的磁盘名字 none ntfs rw,auto,nobrowse</code></strong></p>
<p> <code>:wq</code>  保存退出</p>
</li>
<li><p>重新插入U盘  （此时桌面上看不到了）</p>
<p> 在Finder里 ⌘+⇧+G 输入 <code>/Volumes</code> </p>
</li>
</ul>
<h2 id="Mac终端下出现bogon的解决办法"><a href="#Mac终端下出现bogon的解决办法" class="headerlink" title="Mac终端下出现bogon的解决办法"></a>Mac终端下出现bogon的解决办法</h2><p><code>sudo scutil --set HostName your-hostname</code></p>
<h2 id="Mac更改MAC地址（外接网卡）"><a href="#Mac更改MAC地址（外接网卡）" class="headerlink" title="Mac更改MAC地址（外接网卡）"></a>Mac更改MAC地址（外接网卡）</h2><p><code>sudo ifconfig en9 ether aa:bb:cc:dd:ee</code></p>
<p>但是我外接了Type-C转网线的口，找到对应的也是en9，命令运行后，再用<code>ifconfig</code>看发现mac地址并没有更改成功。<br>在网上又搜了搜，原来需要<strong>装驱动</strong>。<br>这篇文章对这个问题写得相当明白了：<a href="https://blog.csdn.net/u014051620/article/details/75050934" target="_blank" rel="noopener">https://blog.csdn.net/u014051620/article/details/75050934</a></p>
<h2 id="10-14以后Safari装扩展"><a href="#10-14以后Safari装扩展" class="headerlink" title="10.14以后Safari装扩展"></a>10.14以后Safari装扩展</h2><p>cd到有 <code>.safariextz</code>文件的目录。</p>
<p>执行<code>xar -xf 拓展名.safariextz</code> 就可以解包</p>
<p>然后添加扩展，运行即可。详细教程：<a href="https://sspai.com/post/47303" target="_blank" rel="noopener">https://sspai.com/post/47303</a></p>
<h1 id="Sublime相关"><a href="#Sublime相关" class="headerlink" title="Sublime相关"></a>Sublime相关</h1><p>这几个问题怕是用过sublime的都解决过吧~记录一下防止下次碰到再百度了。</p>
<!--more-->
<h2 id="加入subl命令"><a href="#加入subl命令" class="headerlink" title="加入subl命令"></a>加入subl命令</h2><p><code>sudo ln -s &#39;/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl&#39; /usr/local/bin/subl&#39;</code></p>
<h2 id="Sublime3屏蔽更新"><a href="#Sublime3屏蔽更新" class="headerlink" title="Sublime3屏蔽更新"></a>Sublime3屏蔽更新</h2><p><code>&quot;update_check&quot;: false,</code></p>
<!---more--->
<ol>
<li><p> Setting-User里添加<code>&quot;update_check&quot;: false,</code><br> <strong>一定要带，</strong><br> <strong>一定要带，</strong><br> <strong>一定要带，</strong></p>
</li>
<li><p> 再从网上找个能用的序列号：</p>
</li>
</ol>
<p>—– BEGIN LICENSE —–<br>sgbteam<br>Single User License<br>EA7E-1153259<br>8891CBB9 F1513E4F 1A3405C1 A865D53F<br>115F202E 7B91AB2D 0D2A40ED 352B269B<br>76E84F0B CD69BFC7 59F2DFEF E267328F<br>215652A3 E88F9D8F 4C38E3BA 5B2DAAE4<br>969624E7 DC9CD4D5 717FB40C 1B9738CF<br>20B3C4F1 E917B5B3 87C38D9C ACCE7DD8<br>5F7EF854 86B9743C FADC04AA FB0DA5C0<br>F913BE58 42FEA319 F954EFDD AE881E0B<br>—— END LICENSE ——</p>
<p>2017.7.1可用</p>
<h2 id="中文乱码问题"><a href="#中文乱码问题" class="headerlink" title="中文乱码问题"></a>中文乱码问题</h2><p>安装<code>ConvertToUtf8</code>和<code>GBK</code>两个包</p>
<h2 id="支持C-11"><a href="#支持C-11" class="headerlink" title="支持C++11"></a>支持C++11</h2><p>tools–&gt;new build sys</p>
<p>输入：</p>
<pre><code>{
    &quot;cmd&quot;: [&quot;bash&quot;, &quot;-c&quot;, &quot;g++ &#39;${file}&#39; -std=c++11 -stdlib=libc++ -o &#39;${file_path}/${file_base_name}&#39;&quot;],
    &quot;file_regex&quot;: &quot;^(..{FNXX==XXFN}*):([0-9]+):?([0-9]+)?:? (.*)$&quot;,
    &quot;working_dir&quot;: &quot;${file_path}&quot;,
    &quot;selector&quot;: &quot;source.c, source.c++&quot;,
    &quot;variants&quot;:
    [
        {
        &quot;name&quot;: &quot;Run&quot;,
        &quot;cmd&quot;: [&quot;bash&quot;, &quot;-c&quot;, &quot;g++ &#39;${file}&#39; -std=c++11 -stdlib=libc++ -o &#39;${file_path}/${file_base_name}&#39; &amp;&amp; open -a Terminal.app &#39;${file_path}/${file_base_name}&#39;&quot;]
        }
    ]
}
</code></pre><p>保存的时候注意后缀不要改，是<code>.sublime-build</code></p>
<p>如果想调用iTerm2把里面的<code>Terminal.app</code>换成<code>iTerm.app</code>就行了。</p>
<p>换成iTerm之后程序执行完iTerm会自己关闭窗口，需要在设置里修改一下默认配置文件：</p>
<p><img src="http://p66eruxmw.bkt.clouddn.com/20180904153603023933676.png" alt="20180904153603023933676.png"></p>
<h1 id="Heroku"><a href="#Heroku" class="headerlink" title="Heroku"></a>Heroku</h1><h2 id="连接PGSQL"><a href="#连接PGSQL" class="headerlink" title="连接PGSQL"></a>连接PGSQL</h2><p>想给紫玉搭一个Typecho的博客，结果得用pgsql的数据库。</p>
<ol>
<li>添加环境扩展：<a href="https://elements.heroku.com/addons/heroku-postgresql" target="_blank" rel="noopener">https://elements.heroku.com/addons/heroku-postgresql</a></li>
<li>添加好后点Setting可以看到数据库名啥的，正常配置即可</li>
</ol>

            </div>
            <hr>

            

            <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">
    
    <div class="social-share" data-disabled="qzone" data-wechat-qrcode-helper="<p>微信里点“发现”->“扫一扫”二维码便可查看分享。</p>"></div>
    
</div>

<script src="/libs/share/js/social-share.min.js"></script>

            <div class="reprint">
                <p>
                    <span class="reprint-tip">转载请注明: </span>
                    <a href="https://xuanshan.gitee.io" class="b-link-green">炫杉</a>
                    <i class="fa fa-angle-right fa-lg fa-fw text-color"></i>
                    <a href="/Others/技术知识点/" class="b-link-green">小知识点「技术」</a>
                </p>
            </div>
        </div>
    </div>

    

    

    

    
    <div class="livere-card card" data-aos="fade-up">
    <!-- 来必力City版安装代码 -->
    <div id="lv-container" class="card-content" data-id="city" data-uid="MTAyMC8yOTg2My82NDI5">
        <script type="text/javascript">
            (function (d, s) {
                let j, e = d.getElementsByTagName(s)[0];
                if (typeof LivereTower === 'function') {
                    return;
                }

                j = d.createElement(s);
                j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
                j.async = true;

                e.parentNode.insertBefore(j, e);
            })(document, 'script');
        </script>
        <noscript>为正常使用来必力评论功能请激活JavaScript。</noscript>
    </div>
    <!-- City版安装代码已完成 -->
</div>
    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">上一篇</div>
            <div class="card">
                <a href="/Python/Python学习遇到的坑/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/12.jpg" class="responsive-img" alt="Problems in studying Python">
                        
                        <span class="card-title">Problems in studying Python</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary">一些杂碎问题不至于写一篇文章了。放在这收集吧。

Spyder使用IPython Console弹出绘图窗口的设置方法matplotlib 画图show()不显示图
Spyder设置（Cmd + ，）–&gt;IPython Console</div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="fa fa-clock-o fa-fw icon-date"></i>2018-08-06
                        </span>
                        <span class="publish-author">
                            
                            <i class="fa fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/Python/" class="post-category" target="_blank">
                                    Python
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/Python/" target="_blank">
                        <span class="chip bg-color">Python</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">下一篇</div>
            <div class="card">
                <a href="/Others/理论知识点/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/6.jpg" class="responsive-img" alt="小知识点「理论」">
                        
                        <span class="card-title">小知识点「理论」</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary">乱七八糟的东西。都是看博文啥的不懂现搜的~

名词相关RESTfulhttp://www.cnblogs.com/wang-yaz/p/9237981.html
i18ni18n（其来源是英文单词 internationalization的</div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="fa fa-clock-o fa-fw icon-date"></i>2018-07-03
                            </span>
                        <span class="publish-author">
                            
                            <i class="fa fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/Others/" class="post-category" target="_blank">
                                    Others
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/Note/" target="_blank">
                        <span class="chip bg-color">Note</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>
</div>
    </div>
    <div class="col l3 hide-on-med-and-down">
        <div class="toc-widget">
            <div class="toc-title">目录</div>
            <div id="toc-content">

            </div>
        </div>
    </div>
</div>

<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingSelector: 'h1,h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h1,h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });
    });
</script>
    

</main>

<footer class="page-footer bg-color">
    <div class="container row center-align">
        <div class="col s12 m8 l8 copy-right">
            &copy;<a href="https://o--o.win" target="_blank">炫杉2018</a> 
            <a href="https://hexo.io/" target="_blank">Hexo</a> 强力驱动
              主题 <a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">matery</a>        </div>
        <div class="col s12 m4 l4 social-link"><a href="https://github.com/ixsim" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
    <i class="fa fa-github"></i>
</a>

<a href="mailto:chenjiayin1990@163.com" class="tooltipped" target="_blank" data-tooltip="邮件:chinalixs@qq.com" data-position="top" data-delay="50">
    <i class="fa fa-envelope-open"></i>
</a>

<a href="http://wpa.qq.com/msgrd?v=3&uin=6956820&site=qq&menu=yes" class="tooltipped" data-tooltip="QQ: 6956820" data-position="top" data-delay="50">
    <i class="fa fa-qq"></i>
</a>
</div>
    </div>
</footer>

<div class="progress-bar"></div>


<!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title">搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字" class="search-input" autofocus>
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
    searchFunc("/" + "search.xml", 'searchInput', 'searchResult');
</script>
<!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fa fa-angle-up"></i>
    </a>
</div>


<script src="/libs/materialize/js/materialize.min.js"></script>
<script src="/libs/masonry/masonry.pkgd.min.js"></script>
<script src="/libs/aos/aos.js"></script>
<script src="/libs/scrollprogress/scrollProgress.min.js"></script>
<script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
<script src="/js/matery.js"></script>
</body>
</html>